home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
cg
/
rmword.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-11
|
2KB
|
69 lines
/* RmWord -- Delete a word from the Dictionary File */
/* By Bob Caron ©1995 NewTek, Inc. */
call addlib(CG_AREXX,0)
call pragma(d,"rexx:CG/SpellCheck_Support")
if exists(words)=0 then do
call req_tell("Error! wordfile is missing.")
if exists(words.bu) then
if req_ask("Use backup word file?") then
address command "copy words.bu words"
if exists(words)=0 then do
call req_tell("Backup file is also missing!","Replace 'rexx:cg/spellcheck_support/words'")
__QUIT
call req_bar("ToasterCG")
call remlib(CG_AREXX)
exit
end
end
word=req_string("Word To Delete:")
if word="" then do
call REQ_TELL("Canceled!")
call req_bar("ToasterCG")
call remlib(CG_AREXX)
exit
end
if req_ask("Delete "word" from","Dictionary File?")=0 then do
call REQ_TELL("Canceled!")
call req_bar("ToasterCG")
call remlib(CG_AREXX)
exit
end
call rmword(word)
call req_tell(word||" removed.")
call req_bar("ToasterCG")
call remlib(CG_AREXX)
exit
rmword:
parse arg word
call req_bar("Removing Word")
call pragma(d,"rexx:CG/SpellCheck_Support")
if exists('rexx:cg/spellcheck_support/rmword')=0 then do
req_tell("AddWord Program Missing!","It needs to be in 'Rexx/cg/Spellcheck_support'")
call req_bar("ToasterCG")
return
end
address command "delete words.bu2"
address command "rename Toaster:Arexx/cg/spellcheck_support/words.bu Toaster:Arexx/cg/spellcheck_support/words.bu2"
address command "rename Toaster:Arexx/cg/spellcheck_support/words Toaster:Arexx/cg/spellcheck_support/words.bu"
address command "rmword Toaster:Arexx/cg/spellcheck_support/words.bu Toaster:Arexx/cg/spellcheck_support/new_words "||word
if exists("Toaster:Arexx/cg/spellcheck_support/new_words") then do
address command "rename Toaster:Arexx/cg/spellcheck_support/new_words Toaster:Arexx/cg/spellcheck_support/words"
address command "delete Toaster:Arexx/cg/spellcheck_support/word_temp"
address command "delete Toaster:Arexx/cg/spellcheck_support/word_temp.srt"
end
else
call req_tell("Error! Creating new Wordfile")
return
/* $VER:Rmword V1.5 2-14-95 <Cheatah's Never Prosper!>
*/